import os


content = unicode(open("lista exp", "r").read(),"utf-8")
lines = content.split("\n")


is_id = True
out = open("lista_exp_out", "w")
for line in lines:
    if is_id:
        is_id = False
        if line.strip() != "":
            id = int(line.strip())
        else:
            break
    else:
        is_id=True
        item_list = line.split(" ")
        alg= item_list[0].replace("'", "")
        alg_name= item_list[1].replace("'", "")
        out.write("{0}, {1}, {2}\n".format(id, alg, alg_name))
out.close()
        